package com.sky.entity;

import com.baomidou.mybatisplus.core.metadata.OrderItem;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;

public class pageQuery {
    //页码
    private int pageNo;

    //每页显示记录数
    private int pageSize;
    public <T> Page<T> toPage() {
        Page<T> page = Page.of(pageNo, pageSize);
        page.addOrder(new OrderItem("create_time", false));
        return page;
    }
}
